package com.ymatou.query.trading.api.parameter.results;

import java.math.BigDecimal;
import java.util.List;

public class GetBondedProductInfoResult {
	private List<YmtOrderInfo> OrderInfos;
	private List<YmtOrder> Orders;
	private List<YmtIdPic> IdPics;
	private List<YmtTradingItem> TradingItems;

	public List<YmtOrderInfo> getOrderInfos() {
		return OrderInfos;
	}

	public void setOrderInfos(List<YmtOrderInfo> orderInfos) {
		OrderInfos = orderInfos;
	}

	public List<YmtOrder> getOrders() {
		return Orders;
	}

	public void setOrders(List<YmtOrder> orders) {
		Orders = orders;
	}

	public List<YmtIdPic> getIdPics() {
		return IdPics;
	}

	public void setIdPics(List<YmtIdPic> idPics) {
		IdPics = idPics;
	}

	public List<YmtTradingItem> getTradingItems() {
		return TradingItems;
	}

	public void setTradingItems(List<YmtTradingItem> tradingItems) {
		TradingItems = tradingItems;
	}

	public static class YmtOrderInfo {
		private int iOrderId;
		private Integer iBondedArea;
		private Integer iAmount;
		private BigDecimal fOriginalPrice = BigDecimal.ZERO;
		private String sTitle;
		private String sProductCode;
		private String sProductId;
		private String sSKU;
		private String sCatalogId;
		private String sPropertyInfo;
		private YmtOrder Order;

		public int getiOrderId() {
			return iOrderId;
		}

		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}

		public Integer getiBondedArea() {
			return iBondedArea;
		}

		public void setiBondedArea(Integer iBondedArea) {
			this.iBondedArea = iBondedArea;
		}

		public Integer getiAmount() {
			return iAmount;
		}

		public void setiAmount(Integer iAmount) {
			this.iAmount = iAmount;
		}

		public BigDecimal getfOriginalPrice() {
			return fOriginalPrice;
		}

		public void setfOriginalPrice(BigDecimal fOriginalPrice) {
			this.fOriginalPrice = fOriginalPrice;
		}

		public String getsTitle() {
			return sTitle;
		}

		public void setsTitle(String sTitle) {
			this.sTitle = sTitle;
		}

		public String getsProductCode() {
			return sProductCode;
		}

		public void setsProductCode(String sProductCode) {
			this.sProductCode = sProductCode;
		}

		public String getsProductId() {
			return sProductId;
		}

		public void setsProductId(String sProductId) {
			this.sProductId = sProductId;
		}

		public String getsSKU() {
			return sSKU;
		}

		public void setsSKU(String sSKU) {
			this.sSKU = sSKU;
		}

		public String getsCatalogId() {
			return sCatalogId;
		}

		public void setsCatalogId(String sCatalogId) {
			this.sCatalogId = sCatalogId;
		}

		public String getsPropertyInfo() {
			return sPropertyInfo;
		}

		public void setsPropertyInfo(String sPropertyInfo) {
			this.sPropertyInfo = sPropertyInfo;
		}

		public YmtOrder getOrder() {
			return Order;
		}

		public void setOrder(YmtOrder order) {
			Order = order;
		}


	}

	public static class YmtOrder {
		
		private int iOrderId;
		private YmtUser Ymt_User;
		private int iUserId;
		private String sReceivePerson;
		private String sAddress;
		private String sLeaveWord;
		private String sTelephone;
		private Integer iTradingStatus;
		private boolean bPaidInFull;
		private String sBuyerLoginId;
		private String sEmail;
		private BigDecimal fFreight;
		private String dAddTime;
		private String sPhone;
		private String sPostCode;
		private YmtOrderState Ymt_OrderStates;
		private YmtOrderNote Ymt_O_OrderNote;
		private YmtOrderSummary Ymt_OrderSummary;
		private YmtIdPic IdPic;
		private YmtTradingItem TradingItem;
		private int iRiskVerifiedStatus;
		private String sBuyerLoginEmail;
		private int iTradingId;

		public int getiOrderId() {
			return iOrderId;
		}

		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}

		public YmtUser getYmt_User() {
			return Ymt_User;
		}

		public void setYmt_User(YmtUser ymt_User) {
			Ymt_User = ymt_User;
		}

		public int getiUserId() {
			return iUserId;
		}

		public void setiUserId(int iUserId) {
			this.iUserId = iUserId;
		}

		public String getsReceivePerson() {
			return sReceivePerson;
		}

		public void setsReceivePerson(String sReceivePerson) {
			this.sReceivePerson = sReceivePerson;
		}

		public String getsAddress() {
			return sAddress;
		}

		public void setsAddress(String sAddress) {
			this.sAddress = sAddress;
		}

		public String getsLeaveWord() {
			return sLeaveWord;
		}

		public void setsLeaveWord(String sLeaveWord) {
			this.sLeaveWord = sLeaveWord;
		}

		public String getsTelephone() {
			return sTelephone;
		}

		public void setsTelephone(String sTelephone) {
			this.sTelephone = sTelephone;
		}

		public Integer getiTradingStatus() {
			return iTradingStatus;
		}

		public void setiTradingStatus(Integer iTradingStatus) {
			this.iTradingStatus = iTradingStatus;
		}

		public boolean isbPaidInFull() {
			return bPaidInFull;
		}

		public void setbPaidInFull(boolean bPaidInFull) {
			this.bPaidInFull = bPaidInFull;
		}

		public String getsBuyerLoginId() {
			return sBuyerLoginId;
		}

		public void setsBuyerLoginId(String sBuyerLoginId) {
			this.sBuyerLoginId = sBuyerLoginId;
		}

		public String getsEmail() {
			return sEmail;
		}

		public void setsEmail(String sEmail) {
			this.sEmail = sEmail;
		}

		public BigDecimal getfFreight() {
			return fFreight;
		}

		public void setfFreight(BigDecimal fFreight) {
			this.fFreight = fFreight;
		}

		public String getdAddTime() {
			return dAddTime;
		}

		public void setdAddTime(String dAddTime) {
			this.dAddTime = dAddTime;
		}

		public String getsPhone() {
			return sPhone;
		}

		public void setsPhone(String sPhone) {
			this.sPhone = sPhone;
		}

		public String getsPostCode() {
			return sPostCode;
		}

		public void setsPostCode(String sPostCode) {
			this.sPostCode = sPostCode;
		}

		public YmtOrderState getYmt_OrderStates() {
			return Ymt_OrderStates;
		}

		public void setYmt_OrderStates(YmtOrderState ymt_OrderStates) {
			Ymt_OrderStates = ymt_OrderStates;
		}

		public YmtOrderNote getYmt_O_OrderNote() {
			return Ymt_O_OrderNote;
		}

		public void setYmt_O_OrderNote(YmtOrderNote ymt_O_OrderNote) {
			Ymt_O_OrderNote = ymt_O_OrderNote;
		}

		public YmtOrderSummary getYmt_OrderSummary() {
			return Ymt_OrderSummary;
		}

		public void setYmt_OrderSummary(YmtOrderSummary ymt_OrderSummary) {
			Ymt_OrderSummary = ymt_OrderSummary;
		}

		public YmtIdPic getIdPic() {
			return IdPic;
		}

		public void setIdPic(YmtIdPic idPic) {
			IdPic = idPic;
		}

		public YmtTradingItem getTradingItem() {
			return TradingItem;
		}

		public void setTradingItem(YmtTradingItem tradingItem) {
			TradingItem = tradingItem;
		}

		public int getiRiskVerifiedStatus() {
			return iRiskVerifiedStatus;
		}

		public void setiRiskVerifiedStatus(int iRiskVerifiedStatus) {
			this.iRiskVerifiedStatus = iRiskVerifiedStatus;
		}

		public BigDecimal GetCurrentAmountOfCash() {
			BigDecimal amount = BigDecimal.ZERO;
			if (this.Ymt_OrderStates != null) {
				amount = getYmt_OrderStates().getfPaidAmountOfCash().add(
						getYmt_OrderStates().getfPostPaidAmountOfCash()).subtract(
						getYmt_OrderStates().getfRefundedAmountOfCash());

				if (amount.compareTo(BigDecimal.ZERO) < 1)
					amount = BigDecimal.ZERO;
			} 
			return amount;
		}

		public String getsBuyerLoginEmail() {
			return sBuyerLoginEmail;
		}

		public void setsBuyerLoginEmail(String sBuyerLoginEmail) {
			this.sBuyerLoginEmail = sBuyerLoginEmail;
		}
		
		public String toString(){
			return String.valueOf(this.getiOrderId());
		}

		public int getiTradingId() {
			return iTradingId;
		}

		public void setiTradingId(int iTradingId) {
			this.iTradingId = iTradingId;
		}
	}

	public static class YmtTradingItem {
		private int iOrderId;
		private int iTradingId;
		private String dUpdateTime;
		private YmtTradingInfo Ymt_TradingInfo;
		public int getiOrderId() {
			return iOrderId;
		}
		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}
		public int getiTradingId() {
			return iTradingId;
		}
		public void setiTradingId(int iTradingId) {
			this.iTradingId = iTradingId;
		}
		public String getdUpdateTime() {
			return dUpdateTime;
		}
		public void setdUpdateTime(String dUpdateTime) {
			this.dUpdateTime = dUpdateTime;
		}
		public YmtTradingInfo getYmt_TradingInfo() {
			return Ymt_TradingInfo;
		}
		public void setYmt_TradingInfo(YmtTradingInfo ymt_TradingInfo) {
			Ymt_TradingInfo = ymt_TradingInfo;
		}
		
		public String toString(){
			return net.sf.json.JSONObject.fromObject(this).toString();
		}
	}

	public static class YmtOrderState {
		private int iOrderId;
		private BigDecimal fPaidAmountOfCash = BigDecimal.ZERO;
		private BigDecimal fPostPaidAmountOfCash = BigDecimal.ZERO;
		private BigDecimal fRefundedAmountOfCash = BigDecimal.ZERO;

		public int getiOrderId() {
			return iOrderId;
		}

		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}

		public BigDecimal getfPaidAmountOfCash() {
			return fPaidAmountOfCash;
		}

		public void setfPaidAmountOfCash(BigDecimal fPaidAmountOfCash) {
			this.fPaidAmountOfCash = fPaidAmountOfCash;
		}

		public BigDecimal getfPostPaidAmountOfCash() {
			return fPostPaidAmountOfCash;
		}

		public void setfPostPaidAmountOfCash(BigDecimal fPostPaidAmountOfCash) {
			this.fPostPaidAmountOfCash = fPostPaidAmountOfCash;
		}

		public BigDecimal getfRefundedAmountOfCash() {
			return fRefundedAmountOfCash;
		}

		public void setfRefundedAmountOfCash(BigDecimal fRefundedAmountOfCash) {
			this.fRefundedAmountOfCash = fRefundedAmountOfCash;
		}
	}

	public static class YmtTradingInfo {
		private int iTradingId;
		private int iTradingStatus;
		private String sPayChannel;

		public int getiTradingId() {
			return iTradingId;
		}

		public void setiTradingId(int iTradingId) {
			this.iTradingId = iTradingId;
		}

		public int getiTradingStatus() {
			return iTradingStatus;
		}

		public void setiTradingStatus(int iTradingStatus) {
			this.iTradingStatus = iTradingStatus;
		}

		public String getsPayChannel() {
			return sPayChannel;
		}

		public void setsPayChannel(String sPayChannel) {
			this.sPayChannel = sPayChannel;
		}
	}

	public static class YmtIdPic {
		private int iOrderId;
		private int iUserId;
		private String sName;
		private String sCardId;

		public int getiOrderId() {
			return iOrderId;
		}

		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}

		public int getiUserId() {
			return iUserId;
		}

		public void setiUserId(int iUserId) {
			this.iUserId = iUserId;
		}

		public String getsName() {
			return sName;
		}

		public void setsName(String sName) {
			this.sName = sName;
		}

		public String getsCardId() {
			return sCardId;
		}

		public void setsCardId(String sCardId) {
			this.sCardId = sCardId;
		}
	}

	public static class YmtOrderSummary {
		private int iOrderId;
		private String sLogisticsProvider;
		public int getiOrderId() {
			return iOrderId;
		}
		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}
		public String getsLogisticsProvider() {
			return sLogisticsProvider;
		}
		public void setsLogisticsProvider(String sLogisticsProvider) {
			this.sLogisticsProvider = sLogisticsProvider;
		}
	}

	public static class YmtOrderNote {
		private int iOrderId;
		private String dAddTime;
		private String sContent;
		public int getiOrderId() {
			return iOrderId;
		}
		public void setiOrderId(int iOrderId) {
			this.iOrderId = iOrderId;
		}
		public String getdAddTime() {
			return dAddTime;
		}
		public void setdAddTime(String dAddTime) {
			this.dAddTime = dAddTime;
		}
		public String getsContent() {
			return sContent;
		}
		public void setsContent(String sContent) {
			this.sContent = sContent;
		}
	}

	public static class YmtUser {
		private int iUserId;
		private String sPhone;
		private String sLoginEmail;
		public int getiUserId() {
			return iUserId;
		}
		public void setiUserId(int iUserId) {
			this.iUserId = iUserId;
		}
		public String getsPhone() {
			return sPhone;
		}
		public void setsPhone(String sPhone) {
			this.sPhone = sPhone;
		}
		public String getsLoginEmail() {
			return sLoginEmail;
		}
		public void setsLoginEmail(String sLoginEmail) {
			this.sLoginEmail = sLoginEmail;
		}
	}
}
